import yagmail
import logging
def log_set():
    #日志
    logging.basicConfig(level=logging.DEBUG,format='%(levelname)s-%(filename)s-%(message)s',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])
def send_main(a):
    #邮箱
    main=yagmail.SMTP(user='3342752247@qq.com',password='kuxsitvkpsaychja',host='smtp.qq.com')
    main.send(to='3342752247@qq.com',subject='测试报告',contents='测试报告内容展示',attachments=a)
